package edu.whu.puppygo.controller;

import edu.whu.puppygo.assistant.HealthAssistant;
import edu.whu.puppygo.base.HttpResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author guanruwang
 * @date 2023/12/8$
 */
@RestController
@Slf4j
@RequestMapping("/test")
public class TestController {

    @Resource
    private HealthAssistant agent;

    @PostMapping("/chat")
    public HttpResponse<String> chat(String question) {
        String chat = agent.chat(6, question);
        return HttpResponse.success(chat);
    }

}
